﻿@using X.PagedList;
@using X.PagedList.Mvc.Core;
@using X.PagedList.Mvc.Common;
@using FwProject.Distribution.Dto
@model IPagedList<DistributionHistoryDto>
@{
    Layout = null;
    int i = 0;
    if (Model.Count > 0)
    {
        if (Model.PageNumber != 1)
        {

            i = (Model.PageNumber - 1) * Model.PageSize;
        }
    }
    decimal Sumprice = 0;
}
<div>

    <table class="table table-bordered table-hover table-rowselected">
        <thead>
            <tr>
                <th style="width:45px">序号</th>
                <th>操作用户</th>
                <th>操作时间</th>
                <th>记录</th>
            </tr>
        </thead>
        <tbody>
            @if (Model.Count == 0)
            {
                <tr><td colspan="4" align="center">暂无操作历史记录</td></tr>
            }
            else
            {
                foreach (var item in Model)
                {
                    i++;
                    <tr>
                        <td>@i</td>
                        <td>@item.OperatingUser</td>
                        <td>@item.OperatingTime.ToString("yyyy-MM-dd HH:mm:ss")</td>
                        <td>@item.Record</td>
                    </tr>
                }
            }
        </tbody>
    </table>
</div>
<div class="row pagedinfo">
    <div class="col-sm-5">
        共 @Model.TotalItemCount 条，@Model.PageSize 条/页 当前第 @Model.PageNumber/@Model.PageCount 页
    </div>
    <div class="col-sm-7">
        @Html.PagedListPager(Model, page => Url.Action("Index", new { pageIdx = page, AgentPeoperUserId = Context.Request.Query["AgentPeoperUserId"], beginTime = Context.Request.Query["beginTime"], endTime = Context.Request.Query["endTime"] }), PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing(new AjaxOptions() { AllowCache = false, HttpMethod = "Get", UpdateTargetId = "data_list", OnSuccess = "AjaxSuccessCallback", OnBegin = "AjaxBegin" }))
    </div>
</div>


